<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditFeedbackTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_feedbackID}" for="feedbackID" />
                    <h:inputText id="feedbackID" value="#{feedbackController.selected.feedbackID}" title="#{bundle.EditFeedbackTitle_feedbackID}" required="true" requiredMessage="#{bundle.EditFeedbackRequiredMessage_feedbackID}"/>
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_name}" for="name" />
                    <h:inputText id="name" value="#{feedbackController.selected.name}" title="#{bundle.EditFeedbackTitle_name}" />
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_email}" for="email" />
                    <h:inputText id="email" value="#{feedbackController.selected.email}" title="#{bundle.EditFeedbackTitle_email}" />
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_subject}" for="subject" />
                    <h:inputText id="subject" value="#{feedbackController.selected.subject}" title="#{bundle.EditFeedbackTitle_subject}" />
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_content}" for="content" />
                    <h:inputTextarea rows="4" cols="30" id="content" value="#{feedbackController.selected.content}" title="#{bundle.EditFeedbackTitle_content}" />
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_postDate}" for="postDate" />
                    <h:inputText id="postDate" value="#{feedbackController.selected.postDate}" title="#{bundle.EditFeedbackTitle_postDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_isReply}" for="isReply" />
                    <h:inputText id="isReply" value="#{feedbackController.selected.isReply}" title="#{bundle.EditFeedbackTitle_isReply}" />
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_replyContent}" for="replyContent" />
                    <h:inputTextarea rows="4" cols="30" id="replyContent" value="#{feedbackController.selected.replyContent}" title="#{bundle.EditFeedbackTitle_replyContent}" />
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_replyDate}" for="replyDate" />
                    <h:inputText id="replyDate" value="#{feedbackController.selected.replyDate}" title="#{bundle.EditFeedbackTitle_replyDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditFeedbackLabel_respondentID}" for="respondentID" />
                    <h:selectOneMenu id="respondentID" value="#{feedbackController.selected.respondentID}" title="#{bundle.EditFeedbackTitle_respondentID}" >
                        <f:selectItems value="#{personController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{feedbackController.update}" value="#{bundle.EditFeedbackSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditFeedbackViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{feedbackController.prepareList}" value="#{bundle.EditFeedbackShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditFeedbackIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
